<script>
    app.controller('ConfigImportCtrl', function ($scope, $http, $state, $stateParams) {
        $(".html5-uploader").pluploadQueue({
            runtimes: 'html5',
            url: 'r/configs/import/' + $stateParams.appId,
            unique_names: true,
            filters: {
                mime_types: [{
                    extensions: 'json'
                }]
            },
            init: {
                UploadComplete: function () {
                    winModal.close();
                    $state.go($state.current, {}, {reload: true});
                }
            }
        });
    });
</script>
<div class="modal-dialog" ng-controller="ConfigImportCtrl">
    <div class="modal-content">
        <div class="modal-header bg-primary">
            <button type="button" class="close" data-dismiss="modal">&times;</button>
            <h5 class="modal-title">导入配置</h5>
        </div>

        <div class="modal-body">
            <div class="html5-uploader"></div>
        </div>
    </div>
</div>
